// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.QueryDsl;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Json.IRangeQueryConverter))]
public partial interface IRangeQuery
{
	public string Type { get; }
}

public readonly partial struct IRangeQueryFactory<TDocument>
{
	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Date(Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Date(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQueryDescriptor<TDocument>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQueryDescriptor<TDocument>.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Number(Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Number(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQueryDescriptor<TDocument>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQueryDescriptor<TDocument>.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Term(Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Term(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQueryDescriptor<TDocument>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQueryDescriptor<TDocument>.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Untyped(Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Untyped(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQueryDescriptor<TDocument>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQueryDescriptor<TDocument>.Build(action);
	}

	[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
	internal static Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Build(System.Func<Elastic.Clients.Elasticsearch.QueryDsl.IRangeQueryFactory<TDocument>, Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery> action)
	{
		var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IRangeQueryFactory<TDocument>();
		return action.Invoke(builder);
	}
}

public readonly partial struct IRangeQueryFactory
{
	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Date(Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Date(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQueryDescriptor> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQueryDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Date<T>(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQueryDescriptor<T>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQueryDescriptor<T>.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Number(Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Number(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQueryDescriptor> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQueryDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Number<T>(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQueryDescriptor<T>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQueryDescriptor<T>.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Term(Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Term(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQueryDescriptor> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQueryDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Term<T>(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQueryDescriptor<T>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQueryDescriptor<T>.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Untyped(Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Untyped(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQueryDescriptor> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQueryDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Untyped<T>(System.Action<Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQueryDescriptor<T>> action)
	{
		return Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQueryDescriptor<T>.Build(action);
	}

	[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
	internal static Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery Build(System.Func<Elastic.Clients.Elasticsearch.QueryDsl.IRangeQueryFactory, Elastic.Clients.Elasticsearch.QueryDsl.IRangeQuery> action)
	{
		var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IRangeQueryFactory();
		return action.Invoke(builder);
	}
}